// 首页接口封装
import request from '../utils/request'

/**
 * 获取轮播图数据
 * @returns
 */
export const swiperInfo = () => {
  return request({
    url: '/home/swiper',
    method: 'GET',
  })
}

/**
 * 获取租房小组数据
 * @returns
 */
export const homeGroups = () => {
  return request({
    url: '/home/groups',
    method: 'GET',
    params: {
      area: 'AREA%7C88cff55c-aaa4-e2e0',
    },
  })
}

/**
 * 获取城市资讯信息
 * @returns
 */
export const newslist = () => {
  return request({
    url: '/home/news',
    method: 'GET',
    params: {
      area: 'AREA%7C88cff55c-aaa4-e2e0',
    },
  })
}

/**
 * 根据城市名称查询城市信息
 * @param {*} name
 * @returns
 */
export const cityInfo = (name) => {
  return request({
    url: `/area/info?name=${name}`,
    method: 'GET',
  })
}
